package org.gd.hellojaxb.privat24.dbpool.resin;

import javax.xml.bind.annotation.*;

@XmlRootElement(name = "database")
@XmlAccessorType(XmlAccessType.FIELD)
public class Database {

    @XmlElement(name = "jndi-name")
    private String jndiName;
    @XmlElement(name = "driver")
    private Driver driver;
    @XmlElement(name = "prepared-statement-cache-size")
    private Integer preparedStatementCacheSize;
    @XmlElement(name = "max-connections")
    private Integer maxConnections;
    @XmlElement(name = "max-idle-time")
    private String maxIdleTime;

    public Database() {
    }

    public String getJndiName() {
        return jndiName;
    }

    public Database setJndiName(String jndiName) {
        this.jndiName = jndiName;
        return this;
    }

    public Driver getDriver() {
        return driver;
    }

    public Database setDriver(Driver driver) {
        this.driver = driver;
        return this;
    }

    public Integer getPreparedStatementCacheSize() {
        return preparedStatementCacheSize;
    }

    public Database setPreparedStatementCacheSize(Integer preparedStatementCacheSize) {
        this.preparedStatementCacheSize = preparedStatementCacheSize;
        return this;
    }

    public Integer getMaxConnections() {
        return maxConnections;
    }

    public Database setMaxConnections(Integer maxConnections) {
        this.maxConnections = maxConnections;
        return this;
    }

    public String getMaxIdleTime() {
        return maxIdleTime;
    }

    public Database setMaxIdleTime(String maxIdleTime) {
        this.maxIdleTime = maxIdleTime;
        return this;
    }
}
